package main

import (
	"ginchat/docs"
	"ginchat/router"
	"ginchat/utils"

	swaggerfiles "github.com/swaggo/files"
	ginSwagger "github.com/swaggo/gin-swagger"
)

func main() {
	utils.InitConfig()
	utils.InitSqlite()
	lmdbenv := utils.InitLmdb()
	defer lmdbenv.Close()
	docs.SwaggerInfo.BasePath = ""
	r := router.Router()
	r.GET("/swagger/*any", ginSwagger.WrapHandler(swaggerfiles.Handler))
	r.Run()
}
